import { axios } from '@/utils/request'

const api = {
  get_list: '/store-sync/get-list',
  get_log_list: '/store-sync/get-log-list',
  get_store_list: 'store-sync/get-store-list',
  save: '/store-sync/save',
  del: '/store-sync/del',
  exe: '/store-sync/exe'
}

export default api

export function getList (parameter) {
  return axios({
    url: api.get_list,
    method: 'get',
    params: parameter
  })
}

export function getLogList (parameter) {
  return axios({
    url: api.get_log_list,
    method: 'get',
    params: parameter
  })
}

export function getStoreList (parameter) {
  return axios({
    url: api.get_store_list,
    method: 'get',
    params: parameter
  })
}

export function saveData (parameter) {
  return axios({
    url: api.save,
    method: 'post',
    data: parameter
  })
}

export function delData (parameter) {
  return axios({
    url: api.del,
    method: 'post',
    data: parameter
  })
}

export function exeData (parameter) {
  return axios({
    url: api.exe,
    method: 'post',
    data: parameter
  })
}
